package com.sleepingcat.lib_common.service

import android.content.Context
import android.content.Intent
import androidx.activity.result.ActivityResultLauncher
import com.cat.android.lib_base.service.ServiceManager

/**
 * @作者 志浩
 * @时间 2025/5/1 21:57
 * @描述 TODO
 */
interface IFlutter {
    companion object {
        fun get() = ServiceManager.load(IFlutter::class.java)
    }

    fun navigate(context: Context, url: String, argument: Map<String, Any>? = emptyMap(), opaque: Boolean = true)

    fun navigateForResult(context: Context, url: String, argument: Map<String, Any>? = emptyMap(), opaque: Boolean = true, launcher: ActivityResultLauncher<Intent>)

    suspend fun showNativeNormalDialog(title: String, content: String): Boolean

    suspend fun showNativeInputDialog(title: String, content: String, hint: String): String

    suspend fun showFlutterMsgDialog(title: String, content: String): Boolean

    suspend fun showFlutterInputDialog(title: String, content: String, hint: String): String
}